<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        class Person {
            constructor(name) {
                this.name = name;
            };
            showname() {
                return `名字是: ${this.name}`
            };
        };

        class Stu extends Person {};

        let stu1 = new Stu('小白', '逃学');

        console.log(stu1.showname());
    </script>
</body>

</html>